Index: lib/libc/stdlib/realpath.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdlib/realpath.c,v
retrieving revision 1.9
diff -c -c -r1.9 realpath.c
*** lib/libc/stdlib/realpath.c	27 Jan 2000 23:06:50 -0000	1.9
--- lib/libc/stdlib/realpath.c	3 Aug 2003 17:21:20 -0000
***************
*** 138,144 ****
  		rootd = 0;
  
  	if (*wbuf) {
! 		if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) {
  			errno = ENAMETOOLONG;
  			goto err1;
  		}
--- 138,145 ----
  		rootd = 0;
  
  	if (*wbuf) {
! 		if (strlen(resolved) + strlen(wbuf) + (1-rootd) + 1 >
! 		    MAXPATHLEN) {
  			errno = ENAMETOOLONG;
  			goto err1;
  		}
